package com.tom.zx.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tom.zx.entity.DecorationSchemePicture;
import com.tom.zx.entity.HousePictureInformation;
import com.tom.zx.service.IHousePictureInformationService;
import com.tom.zx.service.impl.DecorationSchemePictureServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 装修方案图片 前端控制器
 * </p>
 *
 * @author lp
 * @since 2022-04-16
 */
@RestController
@RequestMapping("/zx/decorationSchemePicture")
public class DecorationSchemePictureController {

    @Autowired
    private DecorationSchemePictureServiceImpl decorationSchemePictureService;

    @GetMapping("decorationScheme/{decorationSchemeId}")
    public List<DecorationSchemePicture> loadHousePictureInformationList(
            @PathVariable Long decorationSchemeId) {
        return
                decorationSchemePictureService.list(
                        new LambdaQueryWrapper<DecorationSchemePicture>()
                                .eq(DecorationSchemePicture::getDecorationSchemeId, decorationSchemeId));
    }
}

